<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="renderer" content="webkit">

</head>
<body>
    <div class="topjui-fluid">
        <fieldset>
            <legend>巡查点</legend>
        </fieldset>
        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">巡查地点：</label>
                <div class="topjui-input-block">
				<input id="chkpointname" type="text" name="chkpointname"
                           style="" class="textbox-f" data-toggle="topjui-textbox"
                           data-options="required:true,prompt:'必填',validType:'maxLength[30]'"  />
                </div>
            </div>
        </div>

        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">位置描述：</label>
                <div class="topjui-input-block">
				<input id="chkpointdes" type="text" name="chkpointdes"
                           style="" class="textbox-f" data-toggle="topjui-textbox"
                           data-options="required:true,prompt:'必填',validType:'maxLength[100]'"  />
                </div>
            </div>
        </div>

        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">巡查内容：</label>
                <div class="topjui-input-block">
				<input id="chkcontent" type="text" name="chkcontent"
                           style="" class="textbox-f" data-toggle="topjui-textbox"
                           data-options="required:true,prompt:'必填',validType:'maxLength[100]'"  />
                </div>
            </div>
        </div>
        
        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">每日巡查次数：</label>
                <div class="topjui-input-block">
				<input id="timesineveryday" type="text" name="timesineveryday"
                           style="" class="textbox-f" data-toggle="topjui-textbox"
                           data-options="required:true,prompt:'必填',validType:['number','length[0,2]']"  />
                </div>
            </div>
        </div>
        
        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">所属部门：</label>
                <div class="topjui-input-block">
					<input type="text" name="depid" id="depid"
		                   data-toggle="topjui-combotree"
		                   data-options="required:true,prompt:'必填',
		               method:'get',
		               valueField:'id',
		               textField:'text',
                       panelHeight:230,
		               onSelect:function(node){
		               	$('form[id^=chkpointDg]:first').find('#userid').combobox({
		               		url:'/chkpoint/queryUser?depid='+node.id,
		               		method: 'get', 
		        			valueField: 'id',//绑定字段ID            
		        			textField: 'text',//绑定字段Name            
		        			panelHeight: 200,//自适应   
		        			multiple: false,
		        			value:'' //避免出现当选择其他部门时人员框仍然出现上一个id的情况
		               	});
		               },
		               onLoadSuccess:function(data,node){
		               		//alert('下拉框加载成功后，调用回显代码！'+USERID);//结果是对的
		               		debugger;		
		               
		               		//添加部门回显
		               		var _this = this;
		               		$.get('/chkpoint/getDep?chkpointid='+ID,function(result){
		               			var jsondata = JSON.parse(result);//得到回显数据
		               			debugger;
		               			//alert(jsondata.data[0].text+'********');
		               			
		               				//重新触发联动 将职位信息框定在联动区域
		               				$('form[id^=chkpointDg]:first').find('#userid').combobox({
					               		url:'/chkpoint/queryUser?depid='+jsondata.data[0].id,
					               		method: 'get', 
					        			valueField: 'id',//绑定字段ID            
					        			textField: 'text',//绑定字段Name            
					        			panelHeight: 'auto',//自适应   
					        			multiple: false,
					        			value:USERID
					               	});

  							});
		               
		               },
		               url:'/user/queryDep'">
                </div>
            </div>
        </div>
        
        <div class="topjui-row">
         <div class="topjui-col-sm8">
                <label class="topjui-form-label">负责人：</label>
                <div class="topjui-input-block">
	               <input type="text" name="userid"
 	                   data-toggle="topjui-combobox" id="userid" 
	                   data-options="required:true,
	               prompt:'负责人',
	               valueField:'id',
	               textField:'text',
	               method:'get',
	               multiple:false">
                </div>
            </div>
         </div>
        
    </div>
</body>
</html>
